package br.eng.eliseu.gwt.gestaoWeb.client.ui;

import br.eng.eliseu.gwt.gestaoWeb.client.event.MainEvent;
import br.eng.eliseu.gwt.gestaoWeb.client.mvp.PortalResource;
import br.eng.eliseu.gwt.gestaoWeb.client.mvp.PresenterMenuEnum;
import br.eng.eliseu.gwt.gestaoWeb.client.mvp.presenter.Presenter;
import br.eng.eliseu.gwt.gestaoWeb.client.mvp.view.BaseDisplay;

import com.google.inject.Inject;

public class MainPresenter implements Presenter {
	

	public interface Display extends BaseDisplay {
		public void showState(Presenter presenter, PresenterMenuEnum state);
	}

	
	private final PortalResource recursos;
	private final Display display;

	
	@Inject
	public MainPresenter(Display display, PortalResource recursos) {
		this.recursos = recursos;
		this.display = display;
		bind();
	}

	public void bind() {
	}

	public void go() {
		/**
		 * Envia um evento para MainEvent para abrir as telas de
		 * CABECALHO, MENUSITE, MENUSISTEMA, HOME e RODAPE
		 */

		getRecursos().getEventBus().fireEvent(new MainEvent());
		
	}

	
	public Display getDisplay() {
		return display;
	}
	public PortalResource getRecursos() {
		return recursos;
	}


}
